﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="EnterBank.aspx.cs" Inherits="Auditors_EnterBank" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script>
        function GoTotxtDate() {
            var oEvent = window.event;
            if (oEvent.keyCode == 13 && !oEvent.ctrlKey) {


                $("#<%=txtDate.ClientID %>").focus();

            }
        }
        function GoTotxtAmount() {
            var oEvent = window.event;
            if (oEvent.keyCode == 13 && !oEvent.ctrlKey) {


                $("#<%=txtAmount.ClientID %>").focus();

            }
        }
        function GoTodropCurrency() {
            var oEvent = window.event;
            if (oEvent.keyCode == 13 && !oEvent.ctrlKey) {


                $("#<%=dropCurrency.ClientID %>").focus();

            }
        }

        function GoTodropExplain() {
            var oEvent = window.event;
            if (oEvent.keyCode == 13 && !oEvent.ctrlKey) {


                $("#<%=dropExplain.ClientID %>").focus();

            }
        }

        function ButtonPostBack() {
            var oEvent = window.event;
            if (oEvent.keyCode == 13 && !oEvent.ctrlKey) {
                __doPostBack($("#<%=Button2.ClientID %>").attr("name"), '');
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <div>
        币种
        <asp:DropDownList ID="dropCurrency" runat="server">
        </asp:DropDownList>
        上期结余：
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    </div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
        OnRowDeleting="GridView1_RowDeleting" OnRowDataBound="GridView1_RowDataBound">
        <Columns>
            <asp:BoundField DataField="VoucherNo" HeaderText="凭证" SortExpression="VoucherNo" />
            <asp:BoundField DataField="Date" HeaderText="日期" SortExpression="Date" />
            <asp:BoundField DataField="Amount" HeaderText="金额" SortExpression="Amount" />
            <asp:BoundField DataField="Currency" HeaderText="币种" SortExpression="Currency" />
            <asp:BoundField DataField="Last" HeaderText="结余" SortExpression="Last" />
            <asp:BoundField DataField="Explain" HeaderText="备注" SortExpression="Explain" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    <div runat="server" id="myDiv">
        <table id="myTable">
            <tr>
                <th>
                    凭证
                </th>
                <th>
                    日期
                </th>
                <th>
                    金额
                </th>
                <th>
                    说明
                </th>
            </tr>
            <tr>
                <td>
                    <asp:TextBox ID="txtVoucherNo" runat="server" onkeydown="GoTotxtDate();"></asp:TextBox>
                </td>
                <td>
                    <asp:TextBox ID="txtDate" runat="server" onkeydown="GoTotxtAmount();"></asp:TextBox>
                </td>
                <td>
                    <asp:TextBox ID="txtAmount" runat="server" onkeydown="GoTodropExplain();"></asp:TextBox>
                </td>
                <td>
                    <asp:DropDownList ID="dropExplain" runat="server" onkeydown="ButtonPostBack();">
                    </asp:DropDownList>
                </td>
                <td style="display: none; width: 0px">
                    <asp:Button ID="Button2" runat="server" UseSubmitBehavior="false" OnClick="Button2_Click" />
                </td>
            </tr>
        </table>
        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" UseSubmitBehavior="false" />
        <%--<input id="Button1" type="button" value="button" onclick="buttonClick" />--%>
    </div>
    <script>
        $(function () {
            $("#idate_1").focus();
        })
    </script>
</asp:Content>
